/**
 * 
 */
package truerefactor.refactor;

import java.util.List;

import truerefactor.graph.ClassNode;
import truerefactor.graph.CodeGraph;
import truerefactor.graph.CodeNode;

/**
 * @author Isaac
 */
public class InlineTemp extends Refactoring {

    /**
     * 
     */
    public InlineTemp()
    {
        this.name = "Inline Temp";
        this.description = "";
    }

    /*
     * (non-Javadoc)
     * @see
     * truerefactor.refactor.Refactoring#execute(truerefactor.graph.CodeNode[])
     */
    @Override
    public void execute(CodeGraph graph)
    {
        // 1. Check the right hand side of the assignment is free of
        // side-effects.

        // 2. Declare the temp as final if it isn't already
        // a. This checks that the temp is really only assigned to once

        // 3. Find all references to the temp and replace them with the right
        // hand side of the assignment

        // 4. Remove the declaration and the assignment of the temp.
    }
}
